package com.copm.ifm.servers.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 项目-租户关联关系表(项目授权)
 *
 * @author zzf
 * @since 2020-12-14
 */
@Getter
@Setter
@ToString
@TableName("sys_project_auth")
@ApiModel("项目-租户关联关系表(项目授权)")
public class SysProjectAuth implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("项目ID")
    private Long projectId;

    @ApiModelProperty("租户id")
    private Long tenantId;

    @ApiModelProperty("设置项目告警天数，单位默认是天")
    private Integer overdueTime;

    @ApiModelProperty("业务类型")
    private String businessTypes;

    @ApiModelProperty("是否过期[0未过期，1已过期]")
    private Boolean isOverdue;

    @ApiModelProperty("是否对外授权[0未授权，1已授权]")
    private Boolean isExternalAuth;

    @ApiModelProperty("对外授权的供应商（tenantId的type是3的租户）")
    private String supplier;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建人")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("修改人")
    private Long updateBy;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private Date updateTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("授权开始时间")
    @NotNull
    private Date authStartTime;

    @TableField(fill = FieldFill.INSERT)
    @NotNull
    @ApiModelProperty("授权结束时间")
    private Date authEndTime;
}
